home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- 16550 - A UART Control Program
- Version 1.0
-
-
- DESCRIPTION:
-
- 16550 is a shareware program designed to allow the 'unlocking'
- of the internal fifo buffer present in the UART chip of the same
- name. The program will scan all four COM ports (COM1: - COM4:)
- available on the PC and report the presence (if any...) of the
- 16550 UART. The user may optionally set the various parameters
- necessary to utilize this buffered mode of operation.
-
- DISCUSSION:
-
- The original PC serial interface specification utilized the
- 8250 Programmable Communications Interface, or UART. This device
- converts data from the microprocessor into a format that is
- easily transmittable via a single-wire connection. To accomplish
- this task, the UART takes data from the computer in a parallel
- format (ie: the bits are presented side-by-side) and shifts them
- out via a single pin in a serial (one bit directly after another,
- daisy-chain fashion) data stream. Various extra bits are added
- such as the start, parity and stop bits to provide the UART on
- the other end of the serial data connection with an accurate
- means for the re-assembly of the original data format.
-
- In the early days of serial communications, particularly that
- involving data transmission via telephone lines, the speed at
- which the data was transmitted wasn't particularly fast. This is
- especially true with telephone lines. The normal voice-grade line
- is extremely limited in it's sound-reproduction qualities. This
- low bandwidth implied that any data must be transmitted very
- slowly to avoid 'overloading' the line. For voice-grade lines,
- the maximum reliable data rate was 300 baud, using the Bell 103
- modem specification. (A modem translates the on/off binary pulses
- into a tone so that the telephone line will treat it as regular
- 'voice' information.)
-
- The UART, of course had to be able to translate data at the
- same rate in order for the system to work. Other serial devices
- such as terminals and printers did not require a modem, but in
- most cases the data rate was still quite slow, usually under
- 19,200 baud.
-
- In the PC, when using the serial port(s) directly, such as
- sending a file to a serial printer, the 8250 UART (or the updated
- 16450 version) was more than able to keep up. Even in a
- telecommunications link, the UART was still fast enough, since
- the data over the phone line was relatively slow.
-
- Another point was that the early PC's weren't terribly fast.
- This was made worse when running a communications program such as
- ProComm or CrossTalk. Since the data rates were slow, there was
- enough time for the computer to run the program instructions
-
-
-
- Page 1
-
-
-
-
-
- 16550 - A UART Control Program
-
-
- while fetching the individual bytes as they came in over the
- serial link. Even at 9600 baud, a very-well
- written comm program was able to keep up with the data.
-
- Time progressed and technology improved serial communications
- (particularly that of modems) to the point where extremely high
- data rates could be achieved. The new V32.bis modems are capable
- of transfer rates of up to 14,400 baud, and with the V42.bis
- compression, data burst rates of over 57,000 baud are feasible.
- Of course, software became more complex as well, but with a
- price. The more complicated the software, the more time it takes
- to handle the program instructions. Couple this with the fact
- that the data is coming in at an extremely high rate, and you
- have a potential problem on your hands!
-
- What typically happens is a data overrun occurs. This means
- that there was still a byte of data left in the UART when the
- next byte came in. Naturally, a loss of just one single byte is
- enough to crash a program, so this is a very important concern!
- One way around the problem is a handshake scheme, whereby the
- transmitting computer holds off sending data until the receiving
- end is ready. This works very well, but one major drawback is
- that a great deal of time is wasted signalling instead of
- transferring data.
-
- The 16550 UART gets around this bottlenecking by incorporating
- a buffer directly in the chip itself. This buffer is designed to
- hold up to 16 bytes (or characters) before an overrun occurs. The
- buffer is arranged in a FIFO manner, meaning First In, First Out.
- In programming terminology this is known as a queue. The 16550
- UART also has improved circuitry which allows it the ability to
- transmit data some 4 times faster than the old 8250! This high-
- speed circuitry helps in the PC environment mainly in interrupt
- timing, though the time saved is rather marginal. Of more
- importance is the FIFO. By having a 'reserve' storage area on the
- chip, if the processor is momentarily busy, (say, executing an
- ANSII graphic sequence) the data is not lost, but held in the
- buffer until the processor is free to receive it.
-
- The problem now lies in the fact that the majority of older
- communications programs do not check for, and utilize the FIFO
- capabilities of the 16550 chip. This is where the 16550 program
- comes to the rescue!
-
- PROGRAM OPERATION:
-
- The 16550 UART initially powers up in a non-FIFO state. This
- makes the UART software-compatible with the 16450, and the older
- 8250. In most cases, the communications software doesn't know the
- difference. At least until the data comes in faster than the
- program can process it!
-
- The 16550 program goes in and 'unlocks' the FIFO capabilities
- in the UART, and even in a buffered state, the 16550 still looks
-
-
-
- Page 2
-
-
-
-
-
- 16550 - A UART Control Program
-
-
- like the 16450 to older programs! If buffering occurs, then the
- data is held, and subsequently read out at a relaxed pace
- automatically, providing full compatibility with older software,
- yet giving the high-speed protection of a data buffer!
-
- PROGRAM PARAMETERS:
-
- The 16550 automatically detects a 16550 UART, and provides
- control for the COM port address, enabling and disabling of the
- FIFO, and the settings for a special interrupt based upon the
- number of characters being held in the FIFO buffer.
-
- Executing the program without specifying any parameters results
- in a scan of all COM ports, and reports the presence of a 16550
- UART in each. If the user knows that a 16550 device exists,
- additional parameters may be specified to access the FIFO. These
- parameters are as follows:
-
- COMn - Tells the 16550 program to use COM port n, where n
- indicates ports 1 through 4. Any value outside of this
- range results in an error. NOTE: A COM port MUST be
- specified when setting the UART!
-
- ? - Echos a brief help text on the screen. No action is
- taken.
-
- /f - Enables the 16550 internal buffers.
-
- /r - Disables the 16550 internal buffers and resets the UART
- to the 8250/16450 compatibility mode.
-
- /tn - Allows the adjustment of the FIFO-full interrupt. n
- specifies the number of characters allowed in the
- buffer before an interrupt occurs. the values for n are
- 1,4,8 and 14. NOTE: this is a very sensitive setting!
- For normal operation with old communications software,
- this parameter should not be used!
-
- The program defaults to FIFO disabled, and a /t parameter of 1.
- If the command line parameters are valid, the program will verify
- that a 16550 UART is present, and that the parameters have been
- set. Unless another program that recognizes a 16550 UART is
- executed, the UART should remain in the current state.
-
- SHAREWARE CONCEPT:
-
- Shareware is a non-conventional approach to software
- distribution. Unlike regular commercial programs, shareware
- allows a 'try-before-you-buy' approach. In most cases, the
- programs are just as bit as good (if not better in some
- instances!) as the programs you buy at a computer store.
-
- Shareware ISN'T freeware! In most cases, the software author is
- a professional who makes at least part of his or her living on
-
-
-
- Page 3
-
-
-
-
-
- 16550 - A UART Control Program
-
-
- the registration of the software program. Typically the user is
- enticed into registration by added features, free updates, etc.
-
- Shareware depends upon the user to make it work. It's up to
- you!
-
- Registration:
-
- This program is 'donate-ware', which is similar in concept to
- shareware. The author makes no claims as being a professional
- software engineer, rather, the author is a disabled hardware
- engineer who enjoys tinkering with programs, and making the
- hardware work better.
-
- If you find that this program is useful, and saves you some
- time and headaches, the author would appreciate a $5.00 (US)
- suggested donation. This amount would include a 'registered' copy
- of the program (without the shareware notice), and the eternal
- thanks from the author. Considering that the cost of new
- communications software that recognizes the 16550 UART far
- exceeds 5 bucks, you get a pretty good deal! Of course, any
- amount is appreciated. Oh, please specify whether you want a
- 360K, 5-1/4" or 720K, 3-1/2" floppy when you register.
-
- .....and the address is:
-
- Brent Turner
- P.O. Box 3612
- Fullerton, CA, 92634-3612
-
- NOTE: Foreign (non-US) users please include a few extra bucks
- for the postage! Thanks.
-
- THE LEGAL STUFF:
-
- This software is distributed on an as-is basis. The author has
- made reasonable attempts to ascertain it's performance, but
- cannot guarantee that it will work in every instance. The author
- is not responsible for any damages, or loss of data resulting
- from the use of this program.
-
- The shareware version of this program may be freely distributed
- as long as all files are included in the package. The registered
- version may not be copied or duplicated.
-
- Shareware vendors may distribute this program as long as the
- cost per disk does not exceed $5.00. This program may be included
- (bundled) with other programs of like nature, so long as the
- above cost-per-disk stipulation is met.
-
- The original source code is not available.
-
-
-
-
-
-
- Page 4
-